// EditForm 组件的 ref 类型
export interface EditFormRef {
  setFieldsValue: (values: any) => void;
  resetFields: () => void;
  getImageChangeFlag: () => boolean;
  show: (values?: any) => void;
}

// DetailForm 组件的 ref 类型
export interface DetailFormRef {
  setFieldsValue: (values: any) => void;
  resetFields: () => void;
  show: (values: any, isEdit: boolean) => void;
}

// 表单字段配置类型
export interface FormFieldConfig {
  dataIndex: string;
  title: string;
  valueType: string;
  required?: number;
  fieldProps?: any;
  [key: string]: any;
}

// 表单组件属性类型
export interface FormComponentProps {
  title?: string;
  columns: FormFieldConfig[];
  onFinish?: (values: any) => Promise<boolean> | boolean;
  onCancel?: () => void;
  [key: string]: any;
}
